import request from '@/utils/request'

export function sync() {
  return request({
    url: '/materialClassification/sync',
    method: 'get'
  })
}

export function list(query) {
  return request({
    url: '/materialClassification/list',
    method: 'get',
    params: query
  })
}

export function listGroupBy() {
  return request({
    url: '/materialClassification/listGroupBy',
    method: 'get',
  })
}

export function listFormulaGroupBy() {
  return request({
    url: '/materialClassification/listFormulaGroupBy',
    method: 'get',
  })
}
export function optionList(query) {
  return request({
    url: '/materialClassification/option-list',
    method: 'get',
    params: query
  })
}
export function add(query) {
  return request({
    url: '/materialClassification/add',
    method: 'post',
    params: query
  })
}

export function update(query) {
  return request({
    url: '/materialClassification/update',
    method: 'put',
    params: query
  })
}

export function deleteById(query) {
  return request({
    url: '/materialClassification/delete',
    method: 'delete',
    params: query
  })
}
